<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>

    <div>
        <p>11</p>
        <h3>22</h3>
        <p>44</p>
        <p>555</p>
    </div>


    <script>

        // 找兄弟

        //   兄弟节点   previousSibling   nextSibling

        //   兄弟元素  previousElementSibling   nextElementSibing

        var oH3 = document.querySelector('h3') ;
        console.log(oH3.previousElementSibling);

        console.log(oH3.nextElementSibling.nextElementSibling) ;

    </script>
    
</body>
</html>